home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Misc Servers / Zope.exe / DTML-WHRANDOM.STX < prev    next >
Encoding:
Text File  |  2000-10-31  |  947 b   |  29 lines

  1. whrandom: DTML Pseudo-Random Number Functions
  2.  
  3.   The 'whrandom' module provides pseudo-random number functions. With
  4.   it, you can generate random numbers and select random elements from
  5.   sequences. This module is a standard Python module.
  6.  
  7.   Functions
  8.  
  9.     choice(seq) -- Chooses a random element from the non-empty sequence
  10.     'seq' and returns it.
  11.  
  12.     randint(a, b) -- Returns a random integer 'N' such that 'a<=N<=b'.
  13.  
  14.     random() -- Returns the next random floating point number in the range
  15.     [0.0 ... 1.0).
  16.  
  17.     seed(x, y, z) -- Initializes the random number generator from the
  18.     integers 'x', 'y' and 'z'. When the module is first imported, the random
  19.     number is initialized using values derived from the current time.
  20.  
  21.     uniform(a, b) -- Returns a random real number 'N' such that 'a<=N<b'.
  22.  
  23.   See Also
  24.  
  25.     "Python 'whrandom' module":http://www.python.org/doc/current/lib/module-whrandom.html
  26.  
  27.  
  28.  
  29.